<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>


<div class="span9">
	<div class="well well-large">
			
		<c:if test="${not empty errors}">
			<c:forEach items="${errors}" var="error">
				<div class="alert alert-error">
					<button type="button" class="close" data-dismiss="alert">&times;</button>
					${error.message}
				</div>
			</c:forEach>
		</c:if>
			
		<div id="well-content" class="well-content">
			<jsp:include page="table.jsp" />
   		</div>
	   		
	</div>
</div>

<div class="span3">
    <a class="btn btn-inverse" href="${pageContext.request.contextPath}/fornecedor/new">
    	<i class="icon-certificate icon-white"></i> <fmt:message key="BUNDLE_NEW_SUPPLIER"/>
    </a>
    
	<table class="table table-bordered">
	   	<caption><i class="icon-th-list"></i> <fmt:message key="BUNDLE_EMPTY_SUPPLIERS"/> </caption>
	    <thead>
			<tr>
		   		<th><fmt:message key="BUNDLE_NOME"/></th>
		    </tr>
		</thead>
		<tbody>
			<c:if test="${empty ultimosFornecedores}">
				<tr>
					<td colspan="4">
						<div class="alert alert-info">
					    	<button name="skipAjax" type="button" class="close" data-dismiss="alert">&times;</button>
					    	<i class="icon-ban-circle"></i> <fmt:message key="BUNDLE_EMPTY_SUPPLIERS"/>
					    </div>
				    </td>
			    </tr>
			</c:if>
			<c:forEach items="${ultimosFornecedores}" var="ultimoFornecedor">
	   	    	<tr class="success">
					<td>${ultimoFornecedor.nome}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>